package demo2;

public class Dog extends Animal implements IRunnable,IJumpable{//狗是动物且会跑会跳
    String name;

    public Dog(String name) {
        this.name = name;
    }

    @Override
    public void jump() {
        System.out.println(name+"在跳"+" ");
    }

    @Override
    public void run() {
        System.out.println(name+"在跑");
    }
}
